<template>
	<!-- 应收款 -->
	<view>
		<detail-table type="detail"></detail-table>
		<!-- 新增 / 修改 -->
		<add-or-update ref="addOrUpdateRef" @refreshDataList="getDataList"></add-or-update>
	</view>
</template>

<script setup lang="ts">
import { useCrud } from '@/hooks'
import { reactive, ref } from 'vue'
import AddOrUpdate from './detail-or-update.vue'
import DetailTable from './detail-table.vue'
import { IHooksOptions } from '@/hooks/interface'

const state: IHooksOptions = reactive({
	dataListUrl: '/receivePayDetail/page',
	deleteUrl: '/receivePayDetail/delete',
	queryForm: {
		receiptItemsSelfNumber: '',
		receiptItemsCntNo: '',
		receiptItemsReceiptNumber: '',
		receiptItemsCustomerName: '',
	}
})


const addOrUpdateRef = ref()
const addOrUpdateHandle = (id?: Number) => {
	addOrUpdateRef.value.init(id)
}


const { getDataList, sizeChangeHandle, selectionChangeHandle, sortChangeHandle, currentChangeHandle, deleteBatchHandle } = useCrud(state)
</script>
